package com.so.hour.server.controller;

import com.so.hour.server.entity.Tips;
import com.so.hour.server.mapper.TipsMapper;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/gettips")
public class TipsController {
    @Resource
    TipsMapper tipsMapper;

    @GetMapping
    public List<Tips> getTips() {
        return tipsMapper.findAll();
    }
}
